package io.github.uicdb.et.block.multipart.impl;

import io.github.uicdb.et.ModBlockEntityType;
import io.github.uicdb.et.ModBlocks;
import io.github.uicdb.et.block.multipart.MultiPartControllerBE;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.pattern.BlockInWorld;
import net.minecraft.world.level.block.state.pattern.BlockPattern;
import net.minecraft.world.level.block.state.pattern.BlockPatternBuilder;
import net.minecraft.world.level.block.state.predicate.BlockPredicate;
import org.jetbrains.annotations.NotNull;

public class ForgeAltarBE extends MultiPartControllerBE {
    public ForgeAltarBE(BlockPos pos, BlockState blockState) {
        super(ModBlockEntityType.FORGE_ALTAR.get(), pos, blockState);
    }

    @Override
    protected @NotNull BlockPattern getPattern() {
        return BlockPatternBuilder.start()
                .aisle("   ", " b ", "   ")
                .aisle(" c ", "cac", " c ")
                .where('a', BlockInWorld.hasState(BlockPredicate.forBlock(Blocks.DIRT)))
                .where('b', BlockInWorld.hasState(s->s.is(ModBlocks.FORGE_ALTAR)))
                .where('c', BlockInWorld.hasState(BlockPredicate.forBlock(Blocks.STONE)))
                .build();
    }
}
